package cn.cvs.service;

import cn.cvs.dao.SysUserMapper;
import cn.cvs.pojo.SysUser;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service("SysUserService")
@Transactional
public class SysUserServiceImpl implements SysUserService{
    @Autowired
    private SysUserMapper sysUserMapper;


    @Override
    public List<SysUser> selectUserList(SysUser sysUser) {
        return sysUserMapper.selectUserList(sysUser);
    }

    @Override
    public int addUser(SysUser sysUser) {
        int result=sysUserMapper.addUser(sysUser);
        int i=1/0;
        return i;
    }

    @Override
    public int deleteUser(int id) {
        return sysUserMapper.deleteUser(id);
    }

    @Override
    public int updateUser(SysUser sysUser) {
        return sysUserMapper.updateUser(sysUser);
    }


}
